package com.example.demo.service;

import com.example.demo.entity.UserEntity;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired // 服务层调用持久层 Mapper，需要将 UserMapper 的属性注入
    private UserMapper userMapper;

    public List<UserEntity> getAll() {
        return userMapper.getAll();
    }
}
